package main

import (
	"fmt"
	"time"
)

func main() {
	var numbers4 = [...]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
	slice5 := numbers4[4:6:8] //5,6  7,8 ,cap= 4
	length := 2
	capacity := 4
	fmt.Printf("%v, %v\n", length == len(slice5), capacity == cap(slice5))
	slice5 = slice5[:cap(slice5)]       //5,6,7,8,9,10
	slice5 = append(slice5, 11, 12, 13) //5,6,7,8,9,10,11,12,13
	length = 9
	fmt.Printf("%v\n", length == len(slice5))
	slice6 := []int{0, 0, 0}
	copy(slice5, slice6) //0,0,0,8,9,10,11,12,13
	e2 := 0
	e3 := 8
	e4 := 9
	fmt.Printf("%v, %v, %v\n", e2 == slice5[2], e3 == slice5[3], e4 == slice5[4])
	channel := make(chan string, 0)
	go func() {
		var send chan<- string = channel
		send = channel
		send <- "haha"
		fmt.Println("send")
	}()
	go func() {
		var receiver <-chan string = channel

		fmt.Println(<-receiver)
	}()
	time.Sleep(time.Second)

}

type IFuc func(a int) int
